Three rulesets were created in the course of the 1997 Visual Programming Challenge: a solution to the compulsory problem, a solution to an open problem, and a solution to the final problem. This section will present a simple ruleset for line-following, along with the compulsory and final rulesets from the Visual Programming Challenge (space limitations prevent a description of the open problem solution).
All of the rulesets in this paper were developed by the author.
A line-following algorithm can be written in Altaira using only four
rules, as shown in
Figure 8.
Figure 8a
shows a rule that is enabled when the robot is directly over
the center line. This rule turns both motors on, proceeding forward.
Figures 8b and 8c
show rules that are enabled when the robot has
veered to the left and the right of the line, respectively. In both
of these rules, the appropriate motor is stopped, so the robot is
brought back to the line.
Finally, Figure 8d
shows a rule that is invoked when the robot is on a
tape mark, such as when it is crossing tile boundaries. As with the
rule in Figure 8a, this rule causes the robot to proceed forward. As
this rule specifies more sensor inputs than the rules in
Figures 8b and 8c,
it overrides those rules.
All of the rules in this simple ruleset are reflexive, as no state
information is required to perform this task. Due to space
limitations, this is the only complete ruleset that will be shown in
this paper.
The compulsory problem was stated as follows [1]:
The compulsory problem requires exploring and mapping an unknown
system of roads, where only the following fact is known.
In solving the problem, three aspects needed to be addressed: line
following, tile recognition, and ensuring that the entire course is
explored.
This solution uses the four rules shown in
Section 4.1 to
implement line following. A number of additional strategic rules modify the
line-following rules for intersections, as will be described below.
4.1 Line Following
4.2 Compulsory Problem Solution
4.2.1 Line Following